import java.util.Scanner;

public class Exer4 {
    public static void main(String[] args) {
        System.out.println("请输入一个五位数：");
        Scanner input=new Scanner(System.in);
        int num=input.nextInt();
        int num1=num%10;
        int num2=num%100/10;
        int num3=num%1000/100;
        int num4=num%10000/1000;
        int num5=num/10000;
        int sum= num1+num2+num3+num4+num5;
        System.out.println(num+"各位数之和为："+sum);
    }
}
